#pragma once
#include <vector>
#include <string>
#include <iostream>
#include <fstream>
#include "Floor.h"

using namespace std;

class Object
{
protected: 
	vector<vector<vector<Floor*>>> theFloor;
	ObjectType type;		
	bool collision;
	int x,y,z;
	Direction dir;
	Condition condition;
	bool removeable;
//
//Helper Methods
//
	//Checks to see if there is a collision going to occur
	bool checkCollide();
	//Checks to see if there is a collision going to occur
	bool checkCollide(Direction dir2);

public:

//
//Constructors
//
	Object();
	Object(int locx, int locy, int locz,vector<vector<vector<Floor*>>> floor );
	Object(int locx, int locy, int locz, int extraBit, vector<vector<vector<Floor*>>> floor );
	~Object(void);

//
//Getters
//
	ObjectType getType();
	Condition getCondition();
	int getX();
	int getY();
	int getZ();
	bool isCollide();
	Direction getDirection();
	bool needsRemoval();

//
//Setters
//
	
	void changeDirection(Direction direction);
	void setCollide(bool set);

//
//Virtual methods 
//

	//Checks if object is in bounds
	bool bounds();

	//helper to see if a spot is free in terms of floor space
	bool isLegal(Direction dir);

	//Does time step for ai (usually)
	virtual void doTimeStep(Object *tait);	

	//for when this object gets collided against
	virtual void collide(Object* collider);

	//for when this object collides with something else
	virtual void collideWith(Object* collidee);

	virtual void buttonPress(); //For levers

	//Moves in a direction
	virtual void move(Direction direction);

	//Attempts to apply gravity to an object
	virtual void applyGravity(Equip currentEquip);

	//how an object reacts to taits movement
	virtual void react(Equip currentEquip);

	//Checks to see if the object can walk on a type of floor 
	virtual bool legalFloor();

	//When moving on a floor do special actions associated with
	virtual void doFloor(Equip currentEquip);
	
};

//***Object***
//*None
//*Enemy -> AI
//*Block (Full, Half, Unmoveable, Dissolveable)
//*Tait
//*Thieves (Super, Basic)
//*Levers
//*Pick-ups (Potatoes (Chips), Boots, Keys)
//*Portal
//*Gate
//************